package com.rcd.viatornisl.android.model;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

import android.util.Log;

public class BaseModel {
	
	protected Date loadDate(String dateInString) {
		try {
			// Provide the date object
			return new SimpleDateFormat("dd-MMM-yyyy", Locale.getDefault()).parse(dateInString);
	 
		} catch (ParseException exception) {
			// Log the error
			Log.e("Date loadDate(String dateInString)", exception.getLocalizedMessage());
						
			// On error
			exception.printStackTrace();
		}
		
		// Provide the return
		return null;
	}
	
}
